
    <style>
        .delete{
            display: none;
        }
    </style>

<!--删除 弹框-->
<div class="delete">
    <form method="post" onsubmit="delId()" enctype="multipart/form-data">
        <input hidden type="text" name="de_id_del">
        <div id="delete">
            <div class="ltitle">温馨提示</div>
            <div class="lcon">
                <img src="__IMG__/jinggao.png" alt="">
                <p>确定删除?</p>
            </div>
            <div class="alert-btn">
                <button type="submit" class="alert-sure" style="margin-left: 30%;">确定</button>
                <span class="alert-cancel">取消</span>
            </div>
        </div>
    </form>
</div>
<script src="__JS__/jquery.js"></script>
<script>

    function delId() {
        var de_id = $("input[name='de_id_del']").val()
        //console.log(model_id)
        var data = {'de_id':de_id}
        $.ajax({
            //几个参数需要注意一下
            type: "POST",//方法类型
            dataType: "json",//预期服务器返回的数据类型
            url: "{:url('Dept/del')}",//url
            data: data,
            success: function (result) {
                var code = result.code;
                var msg = result.msg;
                changeText(msg, code)
            },
            error:function (result) {
                alert('服务器错误')

            }
        });
    }

</script>
